#ifndef PID_CONTROLLER_HPP
#define PID_CONTROLLER_HPP

class PIDController {
public:
    PIDController();
    PIDController(double kp,double ki,double kd);

    /* 一般型PID */
    double getKp(void);
    void setKp(double kp);
    double getKi(void);
    void setKi(double ki);
    double getKd(void);
    void setKd(double kd);

    /* 标准型PID */
    double getIntegralTime(void);
    void setIntegralTime(double tau_i);
    double getDifferentialTime(void);
    void setDifferentialTime(double tau_d);

    /* 控制器迭代 */
    double iterate(double error);
    void debugPrint(void);
    
private:
    double kp;
    double ki;
    double kd;
    double last_error;
    double integral_error;
};

#endif
